package com.rocketmq.simple;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.client.producer.SendCallback;
import org.apache.rocketmq.client.producer.SendResult;
import org.springframework.stereotype.Component;

/**
 * @author: hw
 * @date: 2021/3/24 15:23
 */
@Component
@Slf4j
public class AsyncSendCallback implements SendCallback {

    @Override
    public void onSuccess(SendResult sendResult) {
        log.info("发送成功消息回调");
    }

    @Override
    public void onException(Throwable e) {
        e.printStackTrace();
        log.info("发送失败消息回调");
    }


}
